// 属性管理子组件统一样式
.attribute-component {
  .el-card {
    border: none;
    box-shadow: none;
    background: transparent;

    .el-card__header {
      background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
      border-bottom: 2px solid #e2e8f0;
      border-radius: 0.75rem 0.75rem 0 0;
      padding: 1.5rem;

      .card-header {
        font-size: 1.25rem;
        font-weight: 600;
        color: #2d3748;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;

        &::before {
          content: '';
          width: 4px;
          height: 1.5rem;
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          border-radius: 2px;
        }
      }
    }

    .el-card__body {
      padding: 1.5rem;
      background: white;
      border-radius: 0 0 0.75rem 0.75rem;
    }
  }

  // 类型标签样式
  .text-center {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
    min-width: 120px;
    padding: 0.75rem;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 0.5rem;
    margin-right: 1rem;
    border-left: 3px solid #667eea;
  }

  // 容器样式
  .container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;

    &:hover {
      background: #f1f5f9;
      border-color: #cbd5e0;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    &:not(:first-child) {
      margin-top: 0;
    }
  }

  // 项目容器样式
  .item-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    gap: 0.75rem;
    min-height: 60px;

    .item {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.5rem;
      border-radius: 0.5rem;
      transition: all 0.3s ease;
      cursor: pointer;
      background: #f8fafc;
      border: 1px solid #e2e8f0;

      &:hover {
        background: #edf2f7;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }

      // 图标样式
      .svg-icon {
        margin-bottom: 0.25rem;
        transition: all 0.3s ease;
      }

      // 文本样式
      span {
        font-size: 0.85rem;
        font-weight: 500;
        color: #4a5568;
        text-align: center;
        line-height: 1.2;
      }

      // 标签样式
      .el-tag {
        border-radius: 0.5rem;
        border: none;
        font-weight: 500;
        padding: 0.5rem 1rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transition: all 0.3s ease;

        &:hover {
          transform: scale(1.05);
          box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }
      }
    }

    // 添加按钮样式
    .el-icon {
      background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
      color: white;
      border-radius: 50%;
      padding: 0.5rem;
      transition: all 0.3s ease;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);

      &:hover {
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
      }
    }
  }

  // 添加按钮样式
  .el-button {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
      background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    }

    &:active {
      transform: translateY(0);
    }
  }

  // 弹出确认框样式优化
  .el-popconfirm {
    .el-popconfirm__main {
      font-weight: 500;
      color: #2d3748;
    }
  }

  // 工具提示样式
  .el-tooltip__trigger {
    .el-icon {
      color: #a0aec0;
      transition: color 0.3s ease;

      &:hover {
        color: #667eea;
      }
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    .container {
      flex-direction: column;
      gap: 1rem;

      .text-center {
        min-width: auto;
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
        justify-content: center;
      }
    }

    .item-container {
      padding: 0.75rem;
      gap: 0.5rem;

      .item {
        min-width: 80px;

        span {
          font-size: 0.8rem;
        }
      }
    }
  }

  @media (max-width: 480px) {
    .el-card__header,
    .el-card__body {
      padding: 1rem;
    }

    .container {
      padding: 0.75rem;
      margin-bottom: 1rem;
    }

    .item-container {
      padding: 0.5rem;
      gap: 0.5rem;

      .item {
        min-width: 70px;
        padding: 0.25rem;

        span {
          font-size: 0.75rem;
        }
      }

      .el-tag {
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
      }
    }

    .el-button {
      width: 100%;
      margin-top: 1rem;
    }
  }
}

// 动画效果
@keyframes itemHover {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

// 加载状态样式
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #a0aec0;

  .el-icon {
    animation: iconRotate 1s linear infinite;
    margin-right: 0.5rem;
  }
}

// 空状态样式
.empty-state {
  text-align: center;
  padding: 2rem;
  color: #a0aec0;

  .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
  }

  .empty-text {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .empty-action {
    .el-button {
      background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    }
  }
}